import 'package:aero_frisbee/gen/assets.gen.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';

class AfInputContentFileView extends ConsumerStatefulWidget {
  const AfInputContentFileView({
    super.key,
    this.onSelectedFile,
    this.onSelectedImg,
  });

  final Function()? onSelectedFile;
  final Function()? onSelectedImg;
  @override
  ConsumerState<ConsumerStatefulWidget> createState() =>
      _AfInputContentFileViewState();
}

class _AfInputContentFileViewState
    extends ConsumerState<AfInputContentFileView> {
  @override
  Widget build(BuildContext context) {
    return Container(
      padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 18),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          GestureDetector(
            behavior: HitTestBehavior.opaque,
            onTap: () {
              widget.onSelectedImg?.call();
            },
            child: Assets.images.chat.chatImgSelect.image(
              width: 42,
            ),
          ),
          const SizedBox(
            width: 30,
          ),
          GestureDetector(
            behavior: HitTestBehavior.opaque,
            onTap: () {
              widget.onSelectedFile?.call();
            },
            child: Assets.images.chat.chatFileSelect.image(
              width: 42,
            ),
          ),
        ],
      ),
    );
  }

  @override
  void initState() {
    super.initState();
  }

  @override
  void dispose() {
    super.dispose();
  }

  @override
  void didUpdateWidget(AfInputContentFileView oldWidget) {
    super.didUpdateWidget(oldWidget);
  }

  @override
  void didChangeDependencies() {
    super.didChangeDependencies();
  }
}
